import { defineStore } from 'pinia'
import { ref } from 'vue'

type ConfigType = {
  page: string
  deviceId: string
  borderWidth: string
  borderColor: string
  rounded: boolean
}

export const useConfigStore = defineStore(
  'config',
  () => {
    const config = ref<ConfigType>({
      page: 'camera',
      deviceId: '',
      borderWidth: '',
      borderColor: '',
      rounded: false
    })

    return { config }
  },
  {
    persist: true
  }
)
